package ua.kpi_java_training.morochenets.module2;

/**
 * @author Ari100tell
 * @data: 22.06.13
 * @time: 21:19
 */
public class PlaceForLife {
    public void setWidth(int width) {
        this.width = width;
    }

    private int width;
    private int length;
    public PlaceForLife(int width, int length) {
        this.width = width;
        this.length = length;
    }
    private int[][] places = new int[width][length];
    public void init() {
            for (int i = 0; i < width; i++) {
                System.out.println();
                for (int j = 0; j < length; j++) {
                    System.out.print(places[i][j] + "  ");
                }
            }
           // return placesForLife;
        }
    public void outputPool(int[][] placesForLife) {
        for (int i = 0; i < width; i++) {
            System.out.println();
            for (int j = 0; j < width; j++) {
                System.out.print(placesForLife[i][j] + "  ");
            }
        }
    }
    public int  getPlace(int positionWidth, int positionLength){
        return places[positionWidth][positionLength];
    }

    public void setPlace(int place, int positionWidth, int positionLength){
        places[positionWidth][positionLength]=place;

    }


}
